package cn.tedu.mvc;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("car")
public class GetController {

    @RequestMapping("get")
    public String get(Integer id,String name){
        return "id值:"+id+"...姓名:"+name;
    }

    @RequestMapping("get2/{id}/{name}")
    public String get2(@PathVariable Integer id,
                       @PathVariable String name){
        return "id值:"+id+"...姓名:"+name;
    }
}
